package ro.gateway.aida.struts.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * 
 * @author Mihai Postelnicu<p>
 *	Used by admin listers
 *  e-mail (mihai@ro-gateway.org)<br>
 * (c) 2003 by eRomania Gateway<p>
 */
public class EditAlerterForm extends ActionForm {
    // --------------------------------------------------------- Instance Variables
    
	protected boolean enabled;
	protected int priority;
	protected String purpose;
	protected String name;
	protected boolean mailable;//owner will receive it via email, too
	protected long id;
	protected boolean intersection;

    // --------------------------------------------------------- Methods

    /**
     * Method reset
     * @param ActionMapping mapping
     * @param HttpServletRequest request
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {
    	enabled=true;
    	priority=2;
    	purpose="";
    	name="";
    	mailable=false;
		id=-1;
    }
	/**
	 * @return
	 */
	public boolean isEnabled() {
		return enabled;
	}

	/**
	 * @return
	 */
	public long getId() {
		return id;
	}

	/**
	 * @return
	 */
	public boolean isMailable() {
		return mailable;
	}

	/**
	 * @return
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return
	 */
	public int getPriority() {
		return priority;
	}

	/**
	 * @return
	 */
	public String getPurpose() {
		return purpose;
	}

	/**
	 * @param b
	 */
	public void setEnabled(boolean b) {
		enabled = b;
	}

	/**
	 * @param l
	 */
	public void setId(long l) {
		id = l;
	}

	/**
	 * @param b
	 */
	public void setMailable(boolean b) {
		mailable = b;
	}

	/**
	 * @param string
	 */
	public void setName(String string) {
		name = string;
	}

	/**
	 * @param i
	 */
	public void setPriority(int i) {
		priority = i;
	}

	/**
	 * @param string
	 */
	public void setPurpose(String string) {
		purpose = string;
	}

	/**
	 * @return
	 */
	public boolean isIntersection() {
		return intersection;
	}

	/**
	 * @param b
	 */
	public void setIntersection(boolean b) {
		intersection = b;
	}

}
